Core java - Interview Questions and Answers for 'Myntra' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Core java - Interview Questions and Answers for 'Myntra' - 3 question(s) found - Order By Newest

 Q1. Can you write a "Hello World" program without using any ";" within it?Core Java
Ans. Yes, That is possible

class A {
public static void main(String args[]){
if(System.out.printf("Hello World")==null){}
}
}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Hello World  Hello world without ;     Asked in 2 Companies        rare


Related Questions

  Why do we write public static void main ? Can we use some other syntax too for main ?
 Which of the following is false about main method ?

a. It should be declared public and static
b. it should have only 1 argument of type String array
c. We can override main method
d. We can overload main method
 Can we have multiple main methods in a single class ?
  Can we overload main method in Java ?
  What will happen if static modifier is removed from the signature of the main method?
  How can we execute a Java class independently if it doesn't have a static main method ?
 Can we declare a main method as abstract ?
 Do all java classes need a main method?
 Can we declare the main method as private ?
 Why main method is declared static ?


Must know at all levels. Among Top 10 frequently asked questions in Java. Very frequently asked to fresh graduates or less experienced professionals.
  Q2. What is Inheritance ?Core Java
Ans. Its a facility for code reuse and independent extension wherein a derived class inherits the properties of parent class.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     inheritance  object oriented programming (oops)  oops concepts  oops concepts  java concepts  code reuse  code re-use   classes  derived classes     Asked in 14 Companies      basic        frequent


Related Questions

  Why do we need Inner classes ? Cant we just work with outer classes wherever we implement Inner classes ?
  Differences between abstract class and interface ?
 What are different types of classes ?
  Will this code give error if i try to add two heterogeneous elements in the arraylist. ? and Why ?
 Which of the following can be marked static ?

a. Methods , Variables and Initialization Blocks.
b. Methods , Variables , Initialization Blocks and Outer Classes and nested Classes.
c. Methods , Variables , Initialization Blocks and Outer Classes.
d. Methods , Variables , Initialization Blocks and nested Classes
 What is the difference between the following two code lines ?

1. new OuterClass().new InnerClass();

2. new OuterClass.InnerClass();
  What are the Wrapper classes available for primitive types ?
  What are wrapper classes ?
  Why Struts 1 Classes are not Thread Safe whereas Struts 2 classes are thread safe ?
  What is a stream and what are the types of Streams and classes of the Streams?


 Q3. Write a Program to print permutations of a String.Core Java
Ans. public static Stream permutations(String str) {
if (str.isEmpty()) {
return Stream.of("");
}

return IntStream.range(0, str.length()).boxed()
.flatMap(i -> permutations(str.substring(0, i) str.substring(i 1)).map(t -> str.charAt(i) t));

}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


Related Questions

  Difference between == and .equals() ?
  Why is String immutable in Java ?
  Explain the scenerios to choose between String , StringBuilder and StringBuffer ?

or

What is the difference between String , StringBuilder and StringBuffer ?
  What are the difference between composition and inheritance in Java?
 Explain OOPs

or

Explain OOPs Principles

or

Explain OOPs Concepts

or

Explain OOPs features

or

Tell me something about OOPs
  What is a Lambda Expression ? What's its use ?
  Why Char array is preferred over String for storing password?
  What are different ways to create String Object? Explain.
  Does garbage collection guarantee that a program will not run out of memory?
  What is the difference between final, finally and finalize() ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: